import request from '@/utils/request'

export function getExpressionMap(param) {
  return request({
    url: 'rest/processExpression/getExpressionMap',
    method: 'post',
    data: param
  })
}

export function save(param) {
  return request({
    url: 'rest/processTemplate/save',
    method: 'post',
    data: param
  })
}

// 列表
export function list(param) {
  return request({
    url: 'rest/process/list',
    method: 'post',
    data: param
  })
}

// 删除
export function deleteOpe(param) {
  return request({
    url: 'rest/process/delete',
    method: 'post',
    data: param
  })
}

// 处理人表达式列表
export function processExpressionList(param) {
  return request({
    url: 'rest/process/delete',
    method: 'post',
    data: param
  })
}

// 流程类型列表
export function processTypeList(param) {
  return request({
    url: 'rest/processType/list',
    method: 'post',
    data: param
  })
}
// 流程类型保存
export function processTypeSave(param) {
  return request({
    url: 'rest/processType/save',
    method: 'post',
    data: param
  })
}

// 流程模块列表
export function placeModuleList(param) {
  return request({
    url: 'rest/processType/placeModuleList',
    method: 'post',
    data: param
  })
}

// 流程模块保存
export function placeModuleSave(param) {
  return request({
    url: 'rest/processType/placeModuleSave',
    method: 'post',
    data: param
  })
}

// 流程类型删除
export function deleteProcessType(param) {
  return request({
    url: 'rest/processType/delete',
    method: 'post',
    data: param
  })
}

// 流程模块删除
export function deletePlaceModule(param) {
  return request({
    url: 'rest/processType/deletePlaceModule',
    method: 'post',
    data: param
  })
}

// 表达式列表
export function getExpressionList(param) {
  return request({
    url: 'rest/processExpression/list',
    method: 'post',
    data: param
  })
}

export function getprocessTemplateList(param) {
  return request({
    url: 'rest/processTemplate/list',
    method: 'post',
    data: param
  })
}

// 根据流程类型获取流程图

export function getProcessTemplate(param) {
  return request({
    url: 'rest/processType/getProcessTemplate',
    method: 'post',
    data: param
  })
}

// 组织职责树
export function getOrgDutyTreeData(param) {
  return request({
    url: 'rest/processExpression/orgDutyTreeData',
    method: 'post',
    data: param
  })
}

// 获取节点
export function getTaskNodeList(param) {
  return request({
    url: 'rest/processTemplate/taskNodeList',
    method: 'post',
    data: param
  })
}

// 系统组织职责列表
export function getUserOrgDuty(param) {
  return request({
    url: 'rest/processExpression/userOrgDuty',
    method: 'post',
    data: param
  })
}
